// contain
package contain

import (
	"swim/etc"
	"swim/serviceclient"
	"swim/webclient"
)

var (
	G_servieceGroup      *serviceclient.ServiceGroup       //全局服务人员列表容器
	G_webClients         *webclient.WebGroup               //全局web客户端容器
	G_ServiceSessionPool *serviceclient.ServiceSessionPool //服务会话池

)

func NewContain() {
	G_servieceGroup = serviceclient.NewLoginGroup(etc.SwImConfiger.MaxServiceUser)
	G_webClients = webclient.NewWebGroup(etc.SwImConfiger.MaxClient)
	G_ServiceSessionPool = serviceclient.NewSessionPool()

}

func StartGC() {
	G_servieceGroup.StartGC()
	G_webClients.StartGC()
	G_ServiceSessionPool.StartGC()
}
func StartPushOnlineUsers() {
	G_servieceGroup.StartPushOnlineUsers()
}
